#!/usr/bin/python3

import os
import time
try:
    text = input("请输入增加的内容:")
    f = open("aa.txt","r")
    f.write(text)
    f.write("\n")
    f.close()

#except FileNotFoundError as e:
except Exception as e:
    f_l = open("/var/log/aa_log.log",'a+')
    f_l.write("user:{0} {1} {2}".format(os.getlogin(),time.ctime(),e))
    f_l.write("\n")
    f_l.close()
